package com.xudow.app.dynamicstate_old.widget;

import android.content.Context;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

import com.xudow.app.R;

/**
 * Created by ske on 2016/7/15.
 */
public abstract class ArticleSpan extends ClickableSpan {
    public ArticleSpan(Context context) {
        this.context = context;
    }

    Context context;

    public abstract void onClick(View widget);

    @Override
    public void updateDrawState(TextPaint ds) {
        ds.setColor(context.getResources().getColor(R.color.name_color));
        ds.setUnderlineText(true);
    }
}
